package com.cw.controller;


import com.cw.common.api.Response;
import com.cw.service.IPatientBedMiddleRjssService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author smq
 * @since 2021-05-09
 */
@Api(tags = {"日间病房中间表"})
@RestController
@RequestMapping("/patient-bed-middle-rjss")
public class PatientBedMiddleRjssController {

    @Autowired
    private IPatientBedMiddleRjssService targetService;


    @ApiOperation(value = "床位登记")
    @PostMapping("/addPatientBed")
    public Response addPatientBed(@RequestParam String bedId, @RequestParam String preid) {
        return targetService.addPatientBed(bedId, preid);
    }


    @ApiOperation(value = "取消预约")
    @PostMapping("/delPatientBed")
    public Response delPatientBed(@RequestParam String bedId, @RequestParam String preid) {
        return targetService.delPatientBed(bedId, preid);
    }


}

